<!--{Atemplate tpl/admin_header}-->
<!--{eval echo $this->Ahtml_js_aurl();}-->
<script language="JavaScript" src="{Acan_path_js}/app/danhao.js" type="text/javascript"></script>
<script>
var url_info = '$this->Amodr-info-';
function checkall(value) {
	if(value=='0'){
		jQuery(".checkbox").attr("checked","checked");
		jQuery("#chkall_del").removeAttr("disabled","disabled");
	}
	if(value=='1'){
		jQuery(".checkbox").removeAttr("checked","checked");
		jQuery("#chkall_del").attr("disabled","disabled");
	}
	if(value=='auth'){
		var chkall = jQuery("input:checked").val();
		if(chkall == null){
			alert('请先选择');
			return false;
		}else{
			return true;
		}
	}
}
jQuery(function(){
	jQuery(".checkbox").change(function (){
		if(jQuery("input:checked").val()){
			jQuery("#chkall_del").removeAttr("disabled","disabled");
		}else{
			jQuery("#chkall_del").attr("disabled","disabled");
		}
	});
})
</script>
{if $this->_SS[uid]==1}
<p>
	<input type="button" class="_btn" value="栏目设置" onclick="Aform.column()"/>
	<input type="button" class="_btn" value="添加" onclick="Aform.add()"/>
</p>
{/if}
<form id="cash_search" method="get" action="">
	<div class="_p">
		<input type="hidden" name="cash_search" value="1" id=""/>
		<span>交易类型：</span>
		<select name="type">
			<option value="" >全部</option>
			<!--{loop $this->enum[cash] $key $val}-->
			<option value="$key" {if $key==$_GET[type]}selected="selected"{/if}>$val</option>
			<!--{/loop}-->
		</select>
		<span>状态：</span>
		<select name="status">
			<option value="" >全部</option>
			<!--{loop $this->enum[status] $key $val}-->
			<option value="$key" {if $key==$_GET[status]}selected="selected"{/if}>$val</option>
			<!--{/loop}-->
		</select>
		<span class="add-on">开始时间：</span>
		<input class="Wdate" name="start_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH',minDate:'%y-%M-{%d-7} 00',maxDate:'%y-%M-{%d+1} 00'})" value="$_GET[start_date]">
		<span class="add-on">到：</span>
		<input class="Wdate" name="end_date" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH',minDate:'%y-%M-{%d-7} 00',maxDate:'%y-%M-{%d+2} 00'})" value="$_GET[end_date]">
		<button class="_btn" type="submit">提交查询</button>
	</div>
</form>
<div class="_data_column dis_none">
	<div class="_list">$column_html</div>
	<input type="submit" class="_btn" value="确定"/>
</div>
<form action="" method="POST">
<table class="-table">
	<tr>
	<!--{loop $column $key $val}-->
		<th><b><a href="$page->theurl-aorder-$key,$pages->neworder$pages->other">$val</a></b></th>
	<!--{/loop}-->
		{if $this->_SS[uid]==1}
		<th><b>管理</b></th>
		{/if}
	</tr>
<!--{loop $list $key $val}-->
	<tr>
		<!--{eval echo $obj->for_html($key,$val,$column,$this->model,'Aform');}-->
		{if $this->_SS[uid]==1}
		<td>
			<input type="button" class="_btn" onclick="Atab.task_new('单号','/$this->Aapp-exp-manage-$val[rid]',0)" value="单号">
			<input type="button" class="_btn" onclick="Atab.task_new('记录','/$this->Aactr-$val[uid]',0)" value="记录">
			<input type="button" class="_btn" onclick="Atab.task_new('用户','/$this->Aapp-user-list?uid=$val[uid]',0)" value="用户">
			<input type="button" class="_btn" onclick="kh_find($val[rid])" value="查看单号" id=""/>
			{if $_GET[type]==4}
			<a href="/$this->Amodr-appeal_do-$val[id]?status=12">通过</a>
			<a href="/$this->Amodr-appeal_do-$val[id]?status=13">拒绝</a>
			{/if}
			<input type="button" class="_btn" value="删除" onClick="javascript:if(confirm('确实要删除吗?')) location.href='$this->Amodr-del-$val[id]';" />
		</td>
		<input type="hidden" name="save[{$key}][id]" size="1" value="$val[id]">
		{/if}
	</tr>
<!--{/loop}-->
	{if $this->_SS[uid]==1}
	<tr>
		<td colspan="10">
			<input type="button" class="_btn" onclick="javascript:checkall(0);" value="全选" >
			<input type="button" class="_btn" onclick="javascript:checkall(1);" value="反选">
			<input type="submit" class="_btn" id="chkall_del" disabled="disabled" value="删除选择" onClick="javascript:form.action='$this->Amodr-delall';" />
		</td>
	</tr>
	{/if}
</table>
</form>

<!-- 分页 -->
$pages->html

<!--{Atemplate public/tpl/footer}-->